﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Register.IDAL;
using Register.DALFactory;
using Register.Command;
using Register.Model;

namespace Register.BLL
{
    /// <summary>
    /// FileName: HospitalInfoBLL.cs
    /// CLRVersion: 4.0.30319.269
    /// Author: WangYan
    /// Corporation: 
    /// Description: 
    /// DateTime: 2012/6/26 14:12:16
    /// </summary>
  public  class HospitalInfoBLL
    {
      private static string typeNameKey = "IHospitalInfoDALKey";

      public static List<Model.HospitalInfo> GetHospitalInfos()
      {
          IHospitalInfoDAL iAdminInfo = DALFactory<IHospitalInfoDAL>.Create(typeNameKey);

          try
          {
              return iAdminInfo.GetHospitalInfos();
          }
          catch (Exception e)
          {
              LogRecordHelper.LogNote("ERROR",e.Message);
              throw e;
          }

      }

      public static HospitalInfo GetHospitalInfoByID(string Hospital_ID)
      {
          IHospitalInfoDAL iAdminInfo = DALFactory<IHospitalInfoDAL>.Create(typeNameKey);

          try
          {
              return iAdminInfo.GetHospitalInfoByID(Hospital_ID);
          }
          catch (Exception e)
          {
              LogRecordHelper.LogNote("ERROR", e.Message);
              throw e;
          }
      }


    }
}
